/**
 * 
 */
package com.swim.reservationswim.entity;

import org.hibernate.validator.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;
import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;

/**
 * 预约游泳Entity
 * @author ljw
 * @version 2022-08-10
 */
@Table(name="t_reservation_swim", alias="a", columns={
		@Column(name="id", attrName="id", label="唯一标识", isPK=true),
		@Column(name="natatorium_info_id", attrName="natatoriumInfoId", label="游泳馆信息id"),
		@Column(name="sex", attrName="sex", label="性别"),
		@Column(name="age", attrName="age", label="年龄"),
		@Column(name="phone", attrName="phone", label="联系电话"),
		@Column(name="area", attrName="area", label="区县"),
		@Column(includeEntity=DataEntity.class),
	}, orderBy="a.update_date DESC"
)
public class ReservationSwim extends DataEntity<ReservationSwim> {
	
	private static final long serialVersionUID = 1L;
	private String natatoriumInfoId;		// 游泳馆id
	private String sex;		// 性别
	private Long age;		// 年龄
	private String phone;		// 联系电话
	private String area;		// 区县
	
	public ReservationSwim() {
		this(null);
	}

	public ReservationSwim(String id){
		super(id);
	}
	
	public String getNatatoriumInfoId() {
		return natatoriumInfoId;
	}

	public void setNatatoriumInfoId(String natatoriumInfoId) {
		this.natatoriumInfoId = natatoriumInfoId;
	}
	
	@NotBlank(message="性别不能为空")
	@Length(min=0, max=1, message="性别长度不能超过 2 个字符")
	public String getSex() {
		return sex;
	}

	public void setSex(String sex) {
		this.sex = sex;
	}
	
	@NotBlank(message="联系电话不能为空")
	@Length(min=0, max=20, message="联系电话长度不能超过 20 个字符")
	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}
	
	@NotBlank(message="区县不能为空")
	@Length(min=0, max=20, message="区县长度不能超过 20 个字符")
	public String getArea() {
		return area;
	}

	public void setArea(String area) {
		this.area = area;
	}

	@NotNull(message="年龄不能为空")
	public Long getAge() {
		return age;
	}

	public void setAge(Long age) {
		this.age = age;
	}
	
	
}